import { Http } from "@/utils/request";
import { Toast } from "@/utils/toast";
import { delayTask } from "@/utils/timer";

const baseUrl = "/welfare_group";

export const info_api = (data: { id: string }, showError = true) => {
  return Http.get<any>(`/v2${baseUrl}/info`, data).catch((error: Error) => {
    showError && delayTask(60, () => Toast.show(error.message));
    return Promise.reject(error);
  });
};
